# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年08月24日
"""
from docx import Document
from docx.shared import Cm

file = Document('./练习/练习.docx')
sec1 = file.sections[0]  # 获取第一个节
sec1.top_margin = Cm(5)
sec1.bottom_margin = Cm(5)
sec1.left_margin = Cm(4)
sec1.right_margin = Cm(4)

file.save('./练习/21结果01.docx')
